package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AWmOrderMapper;
import com.ruoyi.system.domain.AWmOrder;
import com.ruoyi.system.service.IAWmOrderService;

/**
 * 订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-21
 */
@Service
public class AWmOrderServiceImpl implements IAWmOrderService 
{
    @Autowired
    private AWmOrderMapper aWmOrderMapper;

    /**
     * 查询订单
     * 
     * @param orderId 订单主键
     * @return 订单
     */
    @Override
    public AWmOrder selectAWmOrderByOrderId(Long orderId)
    {
        return aWmOrderMapper.selectAWmOrderByOrderId(orderId);
    }

    /**
     * 查询订单列表
     * 
     * @param aWmOrder 订单
     * @return 订单
     */
    @Override
    public List<AWmOrder> selectAWmOrderList(AWmOrder aWmOrder)
    {
        return aWmOrderMapper.selectAWmOrderList(aWmOrder);
    }

    /**
     * 新增订单
     * 
     * @param aWmOrder 订单
     * @return 结果
     */
    @Override
    public int insertAWmOrder(AWmOrder aWmOrder)
    {
        aWmOrder.setCreateTime(DateUtils.getNowDate());
        return aWmOrderMapper.insertAWmOrder(aWmOrder);
    }

    /**
     * 修改订单
     * 
     * @param aWmOrder 订单
     * @return 结果
     */
    @Override
    public int updateAWmOrder(AWmOrder aWmOrder)
    {
        return aWmOrderMapper.updateAWmOrder(aWmOrder);
    }

    /**
     * 批量删除订单
     * 
     * @param orderIds 需要删除的订单主键
     * @return 结果
     */
    @Override
    public int deleteAWmOrderByOrderIds(Long[] orderIds)
    {
        return aWmOrderMapper.deleteAWmOrderByOrderIds(orderIds);
    }

    /**
     * 删除订单信息
     * 
     * @param orderId 订单主键
     * @return 结果
     */
    @Override
    public int deleteAWmOrderByOrderId(Long orderId)
    {
        return aWmOrderMapper.deleteAWmOrderByOrderId(orderId);
    }
}
